<ion-header>
    <ion-toolbar content-page>
        <ion-title>
            资讯
        </ion-title>
        <ion-buttons end>
            <ion-buttons>
                <button ion-button icon-only adpmenutoggle>
                    <i class="toolbar-menu"></i>
                </button>
            </ion-buttons>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content (ionScroll)="scroll($event)" (ionScrollEnd)="scrollEnd($event)">
    <ion-refresher (ionRefresh)="doRefresh($event)" [pullMax]="800">
        <ion-refresher-content></ion-refresher-content>
    </ion-refresher>

    <div class="info-hd">
        <div class="search-bar">
            <input type="text" placeholder="标题" [(ngModel)]="keyword" (keyup)="searchKeyword($event,true)">
            <i (click)="searchKeyword($event,false)"></i>
        </div>
        <button ion-button (click)="goToCollectionList()">收藏夹</button>
    </div>
    <ion-list id="info-list" [virtualScroll]="infoListData" [bufferRatio]=6 [approxItemHeight]="clientItemHeight">
        <div class="info-bd" #wrapper *virtualItem="let item  index as index">
            <div class="info-card" (click)="goToInfoDetail(item.id,index,item.linkUrl,item.title,item.imgUrl,item.status)">
                <img (load)="loadImg($event,item.imgUrl)"  src="{{item.imgUrl?item.imgUrl:'./assets/images/information/img_0.jpg'}}" alt="" *ngIf="item.imgUrl">
                <!--<ion-img [cache]="true" alt="{{item.imgUrl?item.imgUrl:null}}"  [alt]="item.imgUrl" src="{{item.imgUrl}}" *ngIf="item.imgUrl"></ion-img>-->
                <span class="space" *ngIf="!item.imgUrl"></span>
                <!--<adp-lazyload [lazysrc]="item.listImageId?item.listImageId:''"
                              [distance]="0" [content]="content" [wrapper]="wrapper"
                              [className]="imgClassName"></adp-lazyload>-->
                <div class="info-content">
                    <div class="info-title"  [class.read]="item.readStatus"><span  *ngIf="previewLength>0&&index<=(previewLength-1)" class="preview">[预览]</span>{{item.title}}</div>
                    <div class="info-time">{{item.time?(item.time*1000|date:'yyyy/MM/dd HH:mm'):''}}</div>
                </div>
            </div>
        </div>
    </ion-list>
    <div class="adp-list-bottom-tip"  *ngIf="infoListData.length>=6&&requestStatus">
        到底了
    </div>
    <div *ngIf="infoListData.length==0&&requestStatus" class="no-data">
        <div class="no-data-img"><img src="./assets/images/common/icon_nodata.png"></div>
        <div class="no-data-txt">没有相关数据</div>
    </div>
</ion-content>
